<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-touch-fullscreen" content="yes">
  <meta name="msapplication-tap-highlight" content="no">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <title>系统公告</title>
  <link rel="shortcut icon" href="/favicon.ico">
  <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/bootstrap-4.2.1/css/bootstrap.min.css">
  <link rel="stylesheet" href="${pageContext.request.contextPath }/user/SUI_Mobile/sm.min.css">
  <link rel="stylesheet" href="${pageContext.request.contextPath }/user/SUI_Mobile/sm-extend.min.css">
  <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/user/css/common.css">

</head>
<body>
  <div class="container">
    <header class="bar bar-nav header">
      <a class="button button-link button-nav pull-left back" href="#" onclick="history.go(-1)">
        <span class="icon icon-left"></span>返回
      </a>
      <h1 class='title'>系统公告</h1>
    </header>
    <!-- 中间，记录显示 -->
    <div class="mainContent" id="mainContent">
      <div class="content-wrapping">
        <!-- 系统信息 -->
        <div class="systemInfoDiv">
          <c:forEach items="${systemInfoList }" var="systemInfo">
            <div class="card">
              <div class="card-header">
                <a href="${pageContext.request.contextPath }/me?method=showSystemInfoDetailByInfoId&infoid=${systemInfo.infoid}" class="cardInfo" style="color: #3D414A;">
                  <strong>
                    <c:set value="${systemInfo.title}" var="infoTitle"></c:set>
                    <c:choose>
                      <c:when test="${fn:length(infoTitle)>10}">
                        <c:out value="${fn:substring(infoTitle, 0 ,10) }...... "/>
                      </c:when>
                      <c:otherwise>
                        <c:out value="${infoTitle}"/>
                      </c:otherwise>
                    </c:choose>
                  </strong>
                </a>
                <div class="card-header-right color-gray" style="font-size: 17px;">发布于  ${systemInfo.datetime }</div>
              </div>
              <div class="card-content">
                <div class="card-content-inner">
                  <a href="${pageContext.request.contextPath }/me?method=showSystemInfoDetailByInfoId&infoid=${systemInfo.infoid}" class="cardInfo" style="color: #3D414A;">
                    <strong>
                      <c:set value="${systemInfo.infoDetail}" var="infoDetail"></c:set>
                      <c:choose>
                        <c:when test="${fn:length(infoDetail)>25}">
                          <c:out value="${fn:substring(infoDetail,0,25) }...... "/>
                        </c:when>
                        <c:otherwise>
                          <c:out value="${infoDetail}"/>
                        </c:otherwise>
                      </c:choose>
                    </strong>
                  </a>
                </div>
              </div>
            </div>
          </c:forEach>
        </div><!-- end of .systemInfoDiv -->
        <div class="article-end text-center" style="padding: 10px;display: none;">已经到底啦～</div>
      </div><!-- end of .content-wrapping -->
    </div><!-- end of .mainContent -->
  </div> <!-- end of .container -->

  <script type='text/javascript' src='${pageContext.request.contextPath }/user/SUI_Mobile/zepto.min.js' charset='utf-8'></script>
  <script type='text/javascript' src='${pageContext.request.contextPath }/user/SUI_Mobile/sm-extend.min.js' charset='utf-8'></script>
  <script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery-3.3.1.min.js" charset="utf-8"></script>
  <script type="text/javascript" src="${pageContext.request.contextPath }/bootstrap-4.2.1/js/bootstrap.min.js" charset="utf-8"></script>
</body>
</html>